package org.example.traffic.organization;

import org.example.traffic.organization.Organization;
import org.example.traffic.videoInfo.Video;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface OrganizationRepository extends JpaRepository<Organization, Integer> {
    // 根据名称查找组织
    Organization findByName(String name);

    // 分页查询所有视频
    Page<Organization> findAll(Pageable pageable);

    // 根据名称模糊查询（忽略大小写）
    Page<Organization> findByNameContainingIgnoreCase(String name, Pageable pageable);
}
